<script type="text/javascript">
  $(function() {
    $("#shoulddo .planN").click(function() {
      $(this).toggleClass("closeBox");
      $(this).next().toggle();
    });
    $('#shoulddo a[rel*=facebox]').facebox({
      loading_image : '${createLinkTo(dir: 'facebox', file: 'loading.gif')}',
      close_image   : '${createLinkTo(dir: 'facebox', file: 'closelabel.gif')}'
    });
  });
</script>
<div id="shoulddo">
  <g:each in="${planList}" var="plan">
    <g:if test="${plan.content}">
      <g:render template="/page/planpage/${plan.id}" model="[plan:plan]"/>
    </g:if>
    <g:else>
      <div class="plan" id="lesson">
        <div class="planN">
          ${plan.name}
        </div>
        <div class="planC hidden">
              ${plan.description}
        </div>
      </div>
    </g:else>
  </g:each>
</div>
